home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 128 10 / q10.d81 / t.128 shell < prev    next >
Text File  |  2022-08-28  |  14KB  |  357 lines

  1.  
  2.                      L O A D S T A R    S H E L L   1 2 8
  3.  
  4.                              by Robert Rockefeller
  5.  
  6.       The LOADSTAR Shell Utility gives C-128 users the ability to execute
  7. machine-language programs by typing the name of the program, as well as a
  8. RAM disk in bank one RAM in which machine-language and BASIC programs can
  9. be loaded.  Included with the shell program are ten useful utility
  10. programs. Utility programs will execute from the RAM disk very quickly
  11. indeed.
  12.  
  13.      The shell program uses memory from address $1300 to address $1b00.
  14. Since BASIC program storage starts at address $1c00, this means the shell
  15. is compatible with normal BASIC programs.  However, BASIC programs which
  16. try to load machine-language, or POKE data to memory being used by the
  17. shell will crash the computer.  In our experience the shell is compatible
  18. with the vast majority of BASIC programs.
  19.  
  20.      The RAM disk starts at the top of RAM bank 1 at address $ff00, and
  21. grows downwards from there. Any RAM which is not being used by the RAM disk
  22. is available to BASIC for storage of strings, variables, and arrays.  The
  23. RAM disk can grow to a maximum size of about 57000 bytes, is protected from
  24. BASIC and cannot be harmed by BASIC programs, except by programs which POKE
  25. data to memory being used by the RAM disk.  However, BASIC programs of this
  26. type are very rare.
  27.  
  28.     All in all the shell program has a very high degree of compatiblity
  29. with BASIC programs, but will almost certainly crash if used with
  30. commercial machine-language programs such as wordprocessors, paint
  31. programs, etc.
  32.  
  33.     The shell possesses a feature which will allow you to re-start the
  34. shell after pressing the RESET button.  This is useful when you have
  35. programs in the RAM disk since you won't have to re-load.  To restart just
  36. execute SYS4870 from BASIC, or G 1306 from the monitor.  The shell computes
  37. its own checksum to verify code integrity, then it will compute the RAM
  38. disk checksums.  If the shell checksum is invalid the shell will not
  39. re-start, and you must RUN"SHELL to re-start.  If any of the programs in
  40. the RAM disk are invalid their names will be listed, and they will be
  41. marked invalid so they can't be loaded.  In addition, you will be given the
  42. opportunity to clear the RAM disk.
  43.  
  44.     Shell utility programs can be loaded into the RAM disk with the LD
  45. utility (see below) then executed by simply typing their names.  BASIC
  46. programs can also be loaded into the RAM disk with LD then RUN by
  47. specifying a device number of 7.  For example, you would type RUN"MAIL
  48. LIST",U7 then type RETURN to execute the program "MAIL LIST".
  49.  
  50.      If you wish to write your own machine-language programs for use with
  51. the shell you must be aware of several things.  First of all the program
  52. filenames must begin with the letters "COM.".  This is necessary so the
  53. shell can distinguish shell programs from other types of files.  Second of
  54. all, the machine-language programs must be assembled to execute at address
  55. $1c03.  Thirdly, shell machine-language programs must terminate with a RTS
  56. instruction, or by JMPing to address $1303.  Last of all, like BASIC
  57. variables, utility names cannot have a BASIC command embedded in it.  For
  58. example the name "COM.DCLR" would be an invalid name because it has the
  59. command CLR in it.
  60.  
  61.     As an example, one of the included shell programs named "COM.DL" will
  62. list a BASIC program on disk.  To execute it you merely need to type the
  63. utility name without the "COM." prefix, plus the name of one or more files
  64. you wish to list.  For example, to list a BASIC program named "FILECOPY"
  65. you would type DL "FILECOPY", then type the RETURN key.  If you have more
  66. than one disk drive you can specify a device number by prefixing it to the
  67. filename.  For example, DL "FILECOPY" 9,"RAMDOS" would list "FILECOPY" from
  68. device 8, and "RAMDOS" from device 9.  Filenames need not be enclosed in
  69. quotes except when they contain a BASIC command.  For example, "FILECOPY"
  70. would need to be enclosed in quotes since it contains the BASIC command
  71. COPY.  "RAMDOS" would not necessarily need to be in quotes since it
  72. contains no BASIC command.  However, as a general rule we recommend that
  73. filenames be enclosed in quotes.
  74.  
  75.     The ten included utility programs are explained below.
  76.  
  77. "COM.TYPE"
  78.  
  79.     TYPE displays disk text files on the screen.  Either normal or screen
  80. code files can be displayed.  Screen code files can be specified by using
  81. the +S switch.  PET ASCII files are the default type, but can be specified
  82. using the -S switch.  Examples:
  83.  
  84. TYPE +S 9,"CODES" -S "TEXT1"
  85.  
  86. This would display a screen code file "CODES" from device 9, then a PET
  87. ASCII file "TEXT1" from device 8.
  88.  
  89. TYPE "LETTER"
  90.  
  91. This would display a PET ASCII file "LETTER" from device 8.
  92.  
  93. "COM.DUMP"
  94.  
  95.     DUMP displays disk files on the screen in both hexadecimal and text
  96. format.  Either normal or screen code files can be displayed.  Screen code
  97. files can be specified by using the +S switch.  PET ASCII files are the
  98. default type, but can be specified by using the -S switch.  Examples:
  99.  
  100. DUMP +S 9,"CODES" -S "TEXT1"
  101.  
  102. This would display a screen code file "CODES" from device 9, then a PET
  103. ASCII file "TEXT1" from device 8.
  104.  
  105. DUMP "LETTER"
  106.  
  107. This would display a PET ASCII file "LETTER" from device 8.
  108.  
  109. "COM.DL"
  110.  
  111.     DL displays BASIC programs from disk on the screen.  Example:
  112.  
  113. DL 9,"DATABASE" "SUBS"
  114.  
  115. This would display a BASIC program "DATABASE" from device 9, then the file
  116. "SUBS" from device 8.
  117.  
  118. "COM.VAR"
  119.  
  120.     VAR displays all defined variables and their values.  This is mostly
  121. useful during BASIC programming.  Example: VAR
  122.  
  123. "COM.ARY"
  124.  
  125.     ARY can do two things.  ARY alone or ARY LIST lists the names and sizes
  126. of all arrays.  ARY followed by an array name will display the array on the
  127. screen.  This is mostly useful during BASIC programming.  Examples:
  128.  
  129. ARY
  130.  
  131. This would display the names and sizes of all arrays.
  132.  
  133. ARY B
  134.  
  135. This would display the floating point array B.
  136.  
  137. ARY CE$
  138.  
  139. This would display the string array CE$
  140.  
  141. "COM.LD"
  142.  
  143.     LD is provided to load files into the bank 1 RAM disk.  Simply follow
  144. the LD command with the names of files you wish loaded.  See "COM.SUBMIT"
  145. also.  An alternative form LD CLR removes the RAM disk from memory.
  146. Examples:
  147.  
  148. LD "COM.DIR"
  149.  
  150. Load "COM.DIR" into the RAM disk
  151.  
  152. LD "COM.TYPE" "COM.DUMP" "COM.DL"
  153.  
  154. Load "COM.TYPE", "COM.DUMP", and "COM.DL" into the RAM disk
  155.  
  156. "COM.DIR"
  157.  
  158.      DIR is provided to display a directory of the files stored in the RAM
  159. disk.  Example:
  160.  
  161. DIR
  162.  
  163. Displays RAM disk directory.
  164.  
  165. "COM.COM"
  166.  
  167.      COM is provided to specify the search order for COM files.  The shell
  168. always checks the RAM disk first.  Normally device 8 is then searched.
  169. However up to three disk devices can be specified to be searched in any
  170. order.  Examples:
  171.  
  172. COM 9 8
  173.  
  174. Specify that device 9 be searched after the RAM disk, then device 8.
  175.  
  176. COM 8 9 10
  177.  
  178. Specify that device 8 be searched after the RAM disk, then device 9, then
  179. device 10.
  180.  
  181. COM 8
  182.  
  183. Specify that device 8 only be searched after the RAM disk.
  184.  
  185. "COM.SUBMIT"
  186.  
  187.      SUBMIT is possibly the most versatile and useful command of all.  It
  188. allows you to execute lists of commands stored on disk just as if they had
  189. been typed at the keyboard.  Literally any command that you can type in can
  190. be executed from a disk file.  SUBMIT is useful when you find yourself
  191. entering the same sequence of commands over and over.  You can enter these
  192. commands into a disk file and type one command to execute the disk file. 
  193. For example, if you fiad yourself regularly using LD to load several
  194. utilities into the RAM disk, ysu can save typing by putting the LD command
  195. in a SUBMIT file.  If each line in a SUBMIT file begins with a line number,
  196. the lines will be merged into the BASIC program text.
  197.  
  198.      SUBMIT works almost exactly like "SUBMIT.COM" does under CP/M for
  199. those familiar with CP/M.  SUBMIT files must have a "SUB." prefix. 
  200. "SUB.LDALL" is an example of a SUBMIT filename.  Follow the SUBMIT command
  201. with the name of the file you wish to execute.  For example, SUBMIT "LDALL"
  202. would execute the file "SUB.LDALL".
  203.  
  204.      You can pass parameters to SUBMIT files when they are executed.  Each
  205. parameter is scanned and a textual substitution takes place